package top.ltc_cn.minecraft_manager.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Setter
@Getter
@Component
@ConfigurationProperties(prefix = "tencentcloud")
@RefreshScope // 配置热更新
public class TencentCloudProperties {
    private Captcha captcha;

    private Ses ses;

    @Getter
    @Setter
    public static class Captcha {
        private boolean enable;
        private String region;
        private String secretId;
        private String secretKey;
        private List<String> name;
        private Map<String, Config> config;

        @Getter
        @Setter
        public static class Config {
            private boolean enable;
            private Long appid;
            private String appSecretKey;
        }
    }

    @Getter
    @Setter
    public static class Ses {
        private String region = "ap-guangzhou";
        private String secretId;
        private String secretKey;
    }
}
